<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="../js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link href="../js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="../js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="../js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<div id="wname"  style="display:none; width:400px; "> 
	<div style="height: 260px;" class="job_box_div">  
	   <div class="job_box_inp">
		<table class="table_form "style="width:100%">
			<tr><td>
            <textarea name="position" id="copy_url" rows="3" cols="50" class="web_text_textarea" style="width:355px"></textarea>
            </td></tr>
            <tr class="ui_td_11">
            <td  class="ui_content_wrap" colspan='2'><input class="layui-btn layui-btn-normal" type="button" name="add" value=" 复制代码 " /></td>
          </tr>
            <tr><td><span class="admin_web_tip">复制内容并添加到模板中</span></td></tr> 
            <tr><td><span class="admin_web_tip">limit=5 为调用数量，可自行修改，如调用6条，为limit=6</span></td></tr>
		</table> 
	   </div>
	</div>
</div> 

<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了网站所有的广告分类信息，可对广告分类进行修改，删除操作。</div>
</div>
</div>

<div class="clear"></div>

<div class="admin_new_search_box"> 
 <a href="index.php?m=advertise&c=addclass"  class="admin_new_cz_tj" style="margin-left:0px;">+ 添加类别</a>
  </div>
<div class="clear"></div> 
<div class="table-list">
  <div class="admin_table_border">
    <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form action="index.php" name="myform" method="get" target="supportiframe" id='myform'>
    <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
     <input name="m" value="advertise" type="hidden"/>
      <input name="c" value="delclass" type="hidden"/>   
      <table width="100%">
        <thead>
          <tr class="admin_table_top">
          <th><label for="chkall">
                <input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/>
              </label></th>
            <th>编号</th>
            <th align="left">分类名称</th>
            <th>排序</th>
            <th>调用代码</th>
            <th width="120" >操作</th>
          </tr>
        </thead>
        <tbody>
        {yun:}foreach from=$ad_class_list key=key item=list{/yun}
       <tr align="center"{yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$list.id{/yun}">
          <td><input type="checkbox" value="{yun:}$list.id{/yun}"  name='del[]' onclick='unselectall()' rel="del_chk" /></td>
          <td><span>{yun:}$list.id{/yun}</span></td>
          <td align="left"><span>{yun:}$list.class_name{/yun}</span></td>
          
          <td class="od">{yun:}$list.orders{/yun}</td>
		<td class="ud"> 
        	<a href="javascript:void(0);" onClick="copy_adclass('内部调用','{yun\:}adlist classid={yun:}$list.id{/yun} limit=5 item=adlist_{yun:}$list.id{/yun}{/yun}\r\n{yun\:}$adlist_{yun:}$list.id{/yun}.html{/yun}\r\n{yun\:}/adlist{/yun}')" class="admin_cz_sc">内部调用</a>
        </td>
		
          <td><a href="index.php?m=advertise&c=addclass&id={yun:}$list.id{/yun}" class="admin_new_c_bth"> 修改</a> <a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=advertise&c=delclass&id={yun:}$list.id{/yun}');" class="admin_new_c_bth admin_new_c_bth_sc">删除</a></td>
        </tr>
        {yun:}/foreach{/yun}
        <tr>
          <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
          <td colspan="12" ><label for="chkAll2">全选</label>
            <input class="admin_button"  type="button" name="delsub" value="删除所选" onClick="return really('del[]')"/></td>
         </tr>
		{yun:}if $total > $config.sy_listnum {/yun}
			<tr>
				{yun:}if $pagenum==1{/yun}
					<td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
					<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum == $pages{/yun}
					<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}/if{/yun}
				<td colspan="9" class="digg">{yun:}$pagenav{/yun}</td>
			</tr>
		{yun:}/if{/yun}
        </tbody>
      </table>
    </form>
  </div>
</div> 
<script>
var weburl="{yun:}$config.sy_weburl{/yun}";
layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
});
  $(document).ready(function() {
	$(".preview").click(function() {
		var pic_url = $(this).attr('url');
		layer.page(
			"<img src=" + pic_url + " style='width:500px;height:500px; ' >",
			'查看演示图片', ['500px', '500px'], 'auto', { maxmin: true}
		);

	});
});
</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
</body>
</html>